﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Protegidos/Pessoas/GENTE_Pes.master" AutoEventWireup="true" CodeFile="Pesquisar.aspx.cs" Inherits="Protegidos_Pessoas_Pesquisar" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cphSubConteudo" Runat="Server">

<table width="99%" align="center">
    <tr>
        <td>
            <div class="Titulo01">Pesquisar</div>
            <div class="Titulo02">Pessoas</div>
        </td>    
    </tr>
    <tr>
        <td>
            
            <table>               
                <tr>
                    <td style="width: 150px"><span class="textoCZ_12">Nome:</span></td>
                    <td>
                        <telerik:RadComboBox ID="rcbNome" runat="server" Width="400px" 
                            Height="150px" Skin="Telerik"
		                    EmptyMessage="Selecione um Nome" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
		                    EnableVirtualScrolling="true" OnItemsRequested="rcbNome_ItemsRequested" 
                            LoadingMessage="Carregando...">
	                    </telerik:RadComboBox>
                    </td>
                </tr>
            </table>
            
        </td>
    </tr>
    <tr>
        <td align="right">
        <br />
            <asp:Button ID="btnPesquisar" runat="server" Text="Pesquisar" Width="110px" 
                onclick="btnPesquisar_Click" />&nbsp;&nbsp;
            <asp:Button ID="btnLimpar" runat="server" Text="Limpar" Width="110px"/>
        </td>
    </tr>
    <tr runat="server" id="trResultado">
                <td>
                    <table width="100%" align="right">
                        <tr>
                            <td>
                                <div class="SuTituloVR">Resultado da Pesquisa</div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <telerik:RadGrid ID="RadGrid1" Width="100%" Skin="Telerik" 
                                    runat="server" AllowPaging="True" AllowSorting="True"
                                    GridLines="None" AutoGenerateColumns="false" PageSize="20"
                                    OnNeedDataSource="RadGrid1_NeedDataSource" 
                                    OnItemCommand="RadGrid1_ItemCommand" >
                                    <MasterTableView GridLines="None" DataKeyNames="IdPessoa">
                                        <NestedViewTemplate>
                                                
                                                <table cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td>
                                                            <img src='<%# Page.ResolveUrl("~/arq/") + Eval("Foto")  %>'
                                                                alt="Pessoa" width="143" height="175" />
                                                        </td>
                                                        <td>
                                                            Nome: <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("Nome") %>' runat="server" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            
                                        </NestedViewTemplate>
                                        <Columns>
                                            <telerik:GridBoundColumn UniqueName="IdPessoa" HeaderText="IdPessoa" DataField="IdPessoa" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn UniqueName="Nome" HeaderText="Nome" DataField="Nome" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn UniqueName="Cpf" HeaderText="Cpf" DataField="Cpf" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn UniqueName="Matricula" HeaderText="Matricula" DataField="Matricula" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                            <telerik:GridButtonColumn CommandName="Select" Text="Ver perfil completo" UniqueName="SelectColumn" />
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                                   
                            </td>
                        </tr>
                    </table>
                </td>    
            </tr>
</table>

</asp:Content>

